﻿using System;
using Microsoft.Popfly.GameCreator.GameEngine.Events;

namespace Microsoft.Popfly.GameCreator.GameEngine.Behaviors
{
    public class SceneChangeBehavior : IBehavior
    {
        public String newSceneName
        {
            get;
            private set;
        }
        private Game m_game;

        public SceneChangeBehavior(Game game, string newSceneName)
        {
            this.newSceneName = newSceneName;
            m_game = game;
        }

        public void Invoke(BehaviorOwner sender, PGCEventArgs args)
        {
            m_game.ChangeScene(this.newSceneName);
        }
    }
}